<template>
  <el-dialog title="参与用户详情" :visible.sync="show" width="50%">
    <el-table border :data="showList" v-if="showList.length > 0">
      <el-table-column type="index" label="序号"></el-table-column>
      <el-table-column prop="uid" label="用户id"></el-table-column>
      <el-table-column prop="searchValue" label="用户名"></el-table-column>
      <el-table-column prop="lootCode" label="抽奖码"></el-table-column>
      <el-table-column prop="participationTime" label="时间"></el-table-column>
    </el-table>
    <el-pagination
      @current-change="getData"
      :current-page.sync="page"
      :page-size="10"
      layout="total, prev, pager, next"
      :total="total"
    >
    </el-pagination>
  </el-dialog>
</template>
<script>
import { lootRecordList } from "@/api/ds/loot";
export default {
  components: {},
  props: {},
  data() {
    return {
      showList: [],
      page: 1,
      id: "",
      total: 0,
      show: false,
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    async checkJoinPerson(id) {
      this.page = 1;
      this.id = id;
      this.getData();
    },

    async getData() {
      let res = await lootRecordList({
        lsid: this.id,
        pageNum: this.page,
        pageSize: 10,
      });
      if (res.code === 200) {
        this.showList = res.rows;
        this.total = res.total;
      }
    },
  },
  mounted() {},
  beforeCreate() {},
  beforeMount() {},
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroyed() {},
  activated() {},
  deactivated() {},
};
</script>
<style lang="scss" scoped></style>
